#!/bin/bash
###
 # @Author: Logan.Li
 # @Gitee: https://gitee.com/attacker
 # @email: admin@attacker.club
 # @Date: 2024-12-29 15:32:30
 # @LastEditTime: 2025-05-20 23:44:55
 # @Description: 
### 

docker stop gitlab
docker rm gitlab
docker run -d \
    --p 8443:443 --p 8800:80 --p 2222:22 \
    --name gitlab \
    --restart always \
    --privileged=true \
    --volume /data/gitlab/config:/etc/gitlab \
    --volume /data/gitlab/logs:/var/log/gitlab \
    --volume /data/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce
    # 指定版本: gitlab/gitlab-ce:12.3.5-ce.0

# --privileged=true	让容器获取宿主机root权限
# /etc/gitlab/gitlab.rb # external_url地址更新
# gitlab-ctl reconfigure # 载入配置
# docker exec -it gitlab cat /etc/gitlab/initial_root_password #查看密码
